<template name="snippetMessage">
	<li id="{{_id}}" class="message background-transparent-dark-hover {{isSequential}} {{system}} {{t}} {{own}} {{isTemp}} {{chatops}} {{customClass}}" data-username="{{u.username}}" data-groupable="{{isGroupable}}" data-date="{{date}}" data-timestamp="{{timestamp}}">
		{{#if avatar}}
			{{#if avatarFromUsername}}
				<button class="thumb user-card-message" data-username="{{u.username}}" tabindex="1">{{> avatar username=avatarFromUsername}}</button>
			{{else}}
				<button class="thumb user-card-message" data-username="{{u.username}}" tabindex="1">
					<div class="avatar">
						<div class="avatar-image" style="background-image:url({{avatar}});"></div>
					</div>
				</button>
			{{/if}}
		{{else}}
			{{#if emoji}}
				<button class="thumb user-card-message" data-username="{{u.username}}" tabindex="1">
					<div class="avatar">
						{{{getEmoji emoji}}}
					</div>
				</button>
			{{else}}
				<button class="thumb user-card-message" data-username="{{u.username}}" tabindex="1">{{> avatar username=u.username}}</button>
			{{/if}}
		{{/if}}
		{{#if alias}}
			<button type="button" class="user user-card-message" data-username="{{u.username}}" tabindex="1">{{alias}} <span class="message-alias">@{{u.username}}</span></button>
		{{else}}
			<button type="button" class="user user-card-message" data-username="{{u.username}}" tabindex="1">{{u.username}}</button>
		{{/if}}
		<span class="info">
		{{#each roleTags}}
			<span class="role-tag" data-role="{{description}}">{{description}}</span>
		{{/each}}
		{{#if isBot}}
			<span class="is-bot">BOT</span>
		{{/if}}
		<span class="time" title='{{date}} {{time}}'>{{time}}</span>
		{{#if edited}}
			<span class="edited" title='{{_ "edited"}} {{_ "at"}} {{editTime}} {{_ "by"}} {{editedBy}}'>
				<i class="icon-edit" aria-label="{{_ "Edited"}}"></i>
				<button class="thumb thumb-small user-card-message" data-username="{{editedBy}}" tabindex="1">{{> avatar username=editedBy}}</button>
			</span>
		{{/if}}
		{{#if private}}
			<span class="private">{{_ "Only_you_can_see_this_message"}}</span>
		{{/if}}
			<div class="message-cog-container {{hideCog}}">
				<i class="icon-cog message-cog" aria-label="{{_ "Actions"}}"></i>
			</div>
		</span>
		<div class="body" dir="auto">
			{{{body}}}
			{{#if hasOembed}}
				{{#each urls}}
					{{injectIndex . @index}} {{> oembedBaseWidget}}
				{{/each}}
			{{/if}}
			{{#each attachments}}
				{{injectIndex . @index}} {{> messageAttachment}}
			{{/each}}
		</div>
	</li>
</template>

